<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/SmallPayConfiguration.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/SmallPayConfiguration.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '商户支付管理',
                    name: 'SmallPayConfiguration',
                    url: "/SmallPayConfiguration/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {merchant_private_key:'',merchant_public_key:'',alipay_public_key:'',"merchants_id":"","name":"","code":"","type":"","app_id":"","app_secret":"","mch_id":"","mch_key":"","key_path":"","path":"","mer_id":"","hank_app_id":"","apigw_public_key":"","my_private_key":"","mer_prtcl_no":"","creator":"","createDate":"","modifier":"","modifyDate":""},
                editFormOptions: [[{"dataKey":"Merchants","data":[],"title":"商户名称","field":"merchants_id","type":"select","required":true},
                                {"dataKey":"PayType","data":[],"title":" 支付渠道","required":true,"field":"type","type":"select"}],
                               [{"title":"支付方式名称","required":true,"field":"name","type":"text"},
                               {"title":"编码","field":"code","type":"text",hidden: true}],
                              [{"title":"App_ID","required":true,"field":"app_id","colSize":6,"type":"text"},
                               {"title":"App_Secret","required":true,"field":"app_secret","colSize":6,"type":"text",hidden: true}],
                              [{"title":"商户号","field":"mch_id","colSize":6,"type":"text",hidden: true},
                               {"title":"商户证书上传","field":"key_path","colSize":6,"type":"file",hidden: true}],
                              [{"title":"编号","field":"mer_id","type":"text",hidden: true},
                               {"title":"App_ID","field":"hank_app_id","type":"text",hidden: true}],
                               [{"title":"商户号秘钥","field":"mch_key","colSize":12,"type":"text",hidden: true}],
                               [{"title":"绝对路径","field":"path","colSize":12,"type":"text",hidden: true}],
                              [{"title":"公钥","field":"apigw_public_key","colSize":12,"type":"textarea",hidden: true,"minRows":5}],
                              [{"title":"密钥","field":"my_private_key","colSize":12,"type":"textarea",hidden: true,"minRows":10}],
                               [{"title":"协议","field":"mer_prtcl_no","colSize":12,"type":"text",hidden: true}],
                               [{"title":"应用私钥","field":"merchant_private_key","colSize":12,"type":"text",hidden: true},
                               {"title":"应用公钥","field":"merchant_public_key","colSize":12,"type":"text",hidden: true}],
                               [{"title":"公钥","field":"alipay_public_key","colSize":12,"type":"text",hidden: true},],
                            //   [{"title":"创建人名称","field":"modifierID","disabled":true,"colSize":6,"type":"text"},
                            //    {"title":"创建时间","field":"createID","disabled":true,"colSize":6,"type":"datetime"}],
                            //   [{"title":"修改人名称","field":"modifier","disabled":true,"colSize":6,"type":"text"},
                            //    {"title":"修改时间","field":"modifyDate","disabled":true,"colSize":6,"type":"datetime"}]
                            ],
                searchFormFields: {"name":"","type":"","createDate":"","merchants_id":""},
                searchFormOptions: [[{"dataKey":"Merchants","data":[],"title":"商户名称","field":"merchants_id","type":"select","required":true},{"title":"支付方式名称","field":"name","type":"like"},{"dataKey":"PayType","data":[],"title":" 支付渠道","field":"type","type":"select"},{"title":"创建时间","field":"createDate","type":"datetime"},{"title":"商户编码","field":"merchants_id","type":"like"}]],
                columns: [{field:'merchants_id',title:'商户名称',type:'string',bind:{ key:'Merchants',data:[]},width:220,align:'left',sortable:true},
                       {field:'name',title:'商户名称',type:'string',width:150,require:true,align:'left'},
                       {field:'type',title:' 支付渠道',type:'int',bind:{ key:'PayType',data:[]},width:100,require:true,align:'left'},
                       {field:'app_id',title:'App_ID',type:'string',width:170,require:true,align:'left'},
                       {field:'app_secret',title:'App_Secret',type:'string',width:250,require:true,align:'left'},
                       {field:'mch_id',title:'商户号',type:'string',width:120,align:'left'},
                       {field:'mch_key',title:'商户号秘钥',type:'string',width:350,align:'left'},
                       {field:'key_path',title:'商户证书上传',type:'file',width:250,align:'left'},
                       {field:'mer_id',title:'商户编号',type:'string',width:180,require:true,align:'left'},
                       {field:'path',title:'绝对路径',type:'string',width:350,align:'left'},
                       {field:'hank_app_id',title:'App_ID',type:'string',width:250,align:'left'},
                       {field:'apigw_public_key',title:'网关公钥',type:'string',width:250,align:'left'},
                       {field:'my_private_key',title:'密钥认证',type:'string',width:250,align:'left'},
                       {field:'mer_prtcl_no',title:'协议编号',type:'string',width:180,align:'left'},
                       {field:'creator',title:'创建人名称',type:'string',width:120,readonly:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true},
                       {field:'modifier',title:'修改人名称',type:'string',width:120,readonly:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true},
                       {field:'modifierID',title:'修改人id',type:'int',width:120,hidden:true,align:'left'},
                       {field:'id',title:'主键',type:'string',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'createID',title:'创建人id',type:'int',width:120,hidden:true,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
